<template>
  <div class="home">
    <el-card>
      <div class="avatar-card">
        <el-avatar :src="userStore.avatar" fit="cover" class="avatar" />
        <div class="info">
          <h3 class="title">{{ getTime() }}好阿 {{ userStore.username }}</h3>
          <p class="sub-title">硅谷甄选平台</p>
        </div>
      </div>
    </el-card>

    <div class="svg-icon">
      <svgIcon name="welcome" width="600px" height="300"></svgIcon>
    </div>
  </div>
</template>

<script setup lang="ts">
  import useUserStore from '@/store/modules/user'
  import { getTime } from '@/utils/message'

  const userStore = useUserStore()
</script>

<style lang="scss" scoped>
  .home {
    .avatar-card {
      display: flex;
      align-items: center;
      .avatar {
        width: 80px;
        height: 80px;
      }
      .info {
        margin-left: 20px;
        .title {
          font-weight: bold;
          margin-bottom: 30px;
          font-size: 20px;
        }
        .sub-title {
          font-size: 15px;
          color: skyblue;
        }
      }
    }

    .svg-icon {
      margin-top: 50px;
      display: flex;
      justify-content: center;
    }
  }
</style>
